package com.zx.callback.dao;

import com.zx.callback.po.CouponInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponInfoMapper {

    /**
     * 查询有效的优惠卷
     * @param userId 用户id
     * @param usedState 使用状态
     * @param usedScopeList  使用范围
     * @return
     */
    List<CouponInfo> selectExpiryByUserId(@Param("userId") Long userId, @Param("usedState") Byte usedState, @Param("usedScopeList") List<Byte> usedScopeList);

    int deleteByPrimaryKey(Long id);

    int insert(CouponInfo record);

    int insertSelective(CouponInfo record);

    CouponInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CouponInfo record);

    int updateByPrimaryKey(CouponInfo record);
}